package com.wenyang.service.impl;

import com.wenyang.dao.OrderDao;
import com.wenyang.entity.VO.OrderVo;
import com.wenyang.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @Author Zx
 * @Date 2024/3/28 17:24
 * @Version 1.0
 * 订单业务层
 */
@Service
public class OrderServiceImpl implements OrderService {

    @Autowired
    private OrderDao orderDao;

    /**
     * 根据分页条件查询所有订单信息
     * @param startIdx
     * @param size
     * @param comments
     * @return
     */
    @Override
    public List<OrderVo> listAllByPage(@RequestParam Integer startIdx,@RequestParam Integer size,@RequestParam(required = false) String comments) {
        List<OrderVo> orderVoList = orderDao.listAllByPage(startIdx,size,comments);
        return orderVoList;
    }
}
